<?php


namespace App\Http\Controllers\Api;


use App\Http\Controllers\Controller;
use App\Models\GoodsClass;
use App\Models\goodsColumn;

class HomeController extends Controller
{

    public function homeIcon()
    {

        $data = GoodsClass::where('type', 0)->get();
        return $this->makeResponse($data, '查询成功', 200);
    }

    public function homeColumn()
    {

        $data = goodsColumn::with('goodsSpu')->get();
        return $this->makeResponse($data, '查询成功', 200);
    }

    public function homeSwiper()
    {
        $data=[
//            'http://qiniu.quanyubao.cn/commodity/souyelbt1.png',
            'http://qiniu.quanyubao.cn/commodity/souyelbt2.png',
            'http://qiniu.quanyubao.cn/commodity/souyelbt3.png',
        ];
        return $this->makeResponse($data, '查询成功', 200);
    }
}